<template>
	<div>
		<van-swipe-cell v-for="v in userHistory" :key="v.id">
			<van-card
				:desc="v.desc"
				:title="v.title"
				class="goods-card"
				:thumb="v.img"
			/>
			<template #right>
				<van-button square text="删除" type="danger" class="delete-button" />
			</template>
		</van-swipe-cell>
	</div>
</template>


<script lang="ts" setup>
import { computed } from 'vue';
import { useStore } from 'vuex'

const store = useStore();
const userHistory = computed(() => store.state.userHistory)
</script>

<style>
  .goods-card {
    margin: 0;
    background-color: white;
  }

  .delete-button {
    height: 100%;
  }
</style>